package model;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;

public class Applicant {
	 
      public int getAid() {
		return aid;
	}


	public void setAid(int aid) {
		this.aid = aid;
	}
	int aid;
	String uname;
      String uemail;
      String ustatus;
	



	public Applicant(int aid, String uname, String uemail, String ustatus) {
		super();
		this.aid = aid;
		this.uname = uname;
		this.uemail = uemail;
		this.ustatus = ustatus;
	}


	public String getUstatus() {
		return ustatus;
	}


	public void setUstatus(String ustatus) {
		this.ustatus = ustatus;
	}


	public Applicant(){
		
	}
	
	
	public String getUname() {
		return uname;
	}
	public void setUname(String uname) {
		this.uname = uname;
	}
	public String getUemail() {
		return uemail;
	}
	public void setUemail(String uemail) {
		this.uemail = uemail;
	}
	public ArrayList<String> getJianli(String jid) throws SQLException{
		String sql = "";
		sql = "select * from jianli where jid = " + jid;
		ArrayList<String>  details = new ArrayList<String>();
		ResultSet rs = DataConection.getStat().executeQuery(sql);
		while(rs.next()){
			details.add(rs.getString(1));
			details.add(rs.getString(2));
			details.add(rs.getString(3));
			details.add(rs.getString(4));
			details.add(rs.getString(5));
			details.add(rs.getString(6));
			details.add(rs.getString(7));
		}
		return details;
	}
//	public void setJianli(Applicant a) throws SQLException{
//    	String sql = "insert into applicant(uname,uemail)"+"values("+a.getUname()+",'"+a.getUemail()+"')";
//    	DataConection.getStat().executeUpdate(sql);
//    }
//	public void setJianli(User u) throws SQLException {
//		String sql = "insert into applicant(uname,uemail)"+"values("+u.getUname()+",'"+u.getUemail()+"')";
//    	DataConection.getStat().executeUpdate(sql);
//		
//	}
}
